﻿@model IEnumerable<IRIS.Models.Content>
@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla : Samþykkja greinar";
}

<h2>Samþykkja Grein</h2>
@if (Model.Count() > 0)
{
    <!--<form action="/Content/ApproveArticle">-->
    using (Html.BeginForm())
    {

    <table>
        <tr>
            <th>
                Titill
            </th>
            <th>
                Sett inn
            </th>
            <th>
                Höfundur
            </th>
            <th>
                Samþykkja       
            </th>
        </tr>
        @{int smuu = 0;}
        @foreach (var item in Model)
        {
            <tr>
                <td>@Html.ActionLink(item.ContentTitle, "Details", new { id = item.ID },null)</td>
                <td>@item.Created.ToShortTimeString()</td>
		        <td>@item.Author</td>
	    	    <td><input type="checkbox" id="accept|@item.ID" name="accept|@item.ID" value="true" /></td>
		        <td><input type="hidden" id="articleId|@smuu" name="articleId|@smuu" value="@item.ID" /></td>
            </tr>
            smuu++;
        }
    </table>
 
     <p>
            <input type="submit" value="Samþykkja" />
     </p> 
    }
}
else
{
    <p>Engar Greinar eru Ósamþykktar.</p>
}

